import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router);

// const infoList = () => import('@/components/infoList.vue');
//
// const effectRegion = () => import('@/components/infoSubmit/effectRegion.vue');
//
// const regionChose = () => import('@/components/infoSubmit/regionChose.vue');
// const drFeedBackDetail = () => import('@/components/dailyReport/feedBackDetail.vue');
//
// const planList = () => import('@/components/dailyReport/planList.vue');
//
// const planAdd = () => import('@/components/dailyReport/planAdd.vue');
//
// const planUnits = () => import('@/components/dailyReport/orgListForPlan.vue');
// //信息详情
// const orgList = () => import('@/components/progressPublic/orgList.vue');
//
// const orgList2 = () => import('@/components/progressPublic/orgList2.vue');
//
// const emTeam = () => import('@/components/progressPublic/emTeam.vue');
//
// const emTeamDetail = () => import('@/components/progressPublic/emTeamDetail.vue');
//
// const toZJ = () => import('@/components/progressPublic/toZJ.vue');
//
// const zjList = () => import('@/components/progressPublic/zjList.vue');


const riskDetail = () => import('@/components/eventAndWarnDetail/eventAndWarnDetail.vue');

const riskList = () => import('@/components/indexList/indexList.vue');

const peopleList = () => import('@/components/commonComponents/people.vue');

const orgListWh = () => import('@/components/commonComponents/orgListWh.vue');

const todayNewsIndexList = () => import('@/components/todayNews/todayNewsIndexList.vue');

const todayNewsDetail = () => import('@/components/todayNews/todayNewsDetail.vue');

const infoDetail = () => import('@/components/commonComponents/infoDetail.vue');

const myTask = () => import('@/components/myTask/myTask.vue');

const home = () => import('@/components/home/home.vue');

const infoSubmitList = () => import('@/components/infoSubmit/infoSubmitList.vue');

const infoSubmit = () => import('@/components/infoSubmit/infoSubmit.vue');

const homeInfoDetail = () => import('@/components/home/homeInfoDetail.vue');

//零报告
const dailyReportList = () => import('@/components/dailyReport/drIndexList.vue');

const dailyDetail = () => import('@/components/dailyReport/drDetail.vue');

const feedBackItem = () => import('@/components/progressPublic/feedBackItem.vue');

const feedBackHistory = () => import('@/components/progressPublic/feedBackHistory.vue');

const feedBackContinue = () => import('@/components/progressPublic/feedBackContinue.vue');

const assetDetail = () => import('@/components/progressPublic/assetList.vue');

const workReport = () => import('@/components/workReport/workReportList.vue');

window.cookiePath = "/Ecs";

export default new Router({
  routes: [
    {
      path: cookiePath + '/home',
      component: home,
      children: [
        {
          path: cookiePath + '/home/homeInfoDetail',
          component: homeInfoDetail,
        }
      ]
    },
    {
      path: cookiePath + '/riskList',
      component: riskList,
      children: [
        {
          path: cookiePath + '/riskList/riskDetail',
          component: riskDetail,
          children: [
            {
              path: cookiePath + '/riskDetail/assetDetail',
              component: assetDetail,
            },
            {
              path: cookiePath + '/riskDetail/people',
              component: peopleList,
            },
            {
              path: cookiePath + '/riskDetail/orgList',
              component: orgListWh,
            },
            {
              path: cookiePath + '/riskDetail/feedBackItem',
              component: feedBackItem,
            },
            {
              path: cookiePath + '/riskDetail/feedBackHistory',
              component: feedBackHistory,
            },
            {
              path: cookiePath + '/riskDetail/feedBackContinue',
              component: feedBackContinue,
            },
          ]
        },
        {
          path: cookiePath + '/riskList/infoDetail',
          component: infoDetail,
        },
      ]
    },
    {
      path: cookiePath + '/todayBulletin',
      component: todayNewsIndexList,
      children: [
        {
          path: cookiePath + '/todayBulletin/detail',
          component: todayNewsDetail,
          children: [
            {
              path: cookiePath + '/todayBulletin/people',
              component: peopleList,
            },
            {
              path: cookiePath + '/todayBulletin/infoDetail',
              component: infoDetail,
            },
          ]
        },
      ]
    },
    {
      path: cookiePath + '/myTaskList',
      component: myTask,
      children: [
        {
          path: cookiePath + '/myTaskList/riskDetail',
          component: riskDetail,
          children: [
            {
              path: cookiePath + '/myTaskList/people',
              component: peopleList,
            },
            {
              path: cookiePath + '/myTaskList/orgList',
              component: orgListWh,
            },
            {
              path: cookiePath + '/myTaskList/feedBackHistory',
              component: feedBackHistory,
            },
            {
              path: cookiePath + '/myTaskList/feedBackContinue',
              component: feedBackContinue,
            },
          ]
        },
      ]
    },
    {
      path: cookiePath + '/infoSubmitList',
      component: infoSubmitList,
      children: [
        {
          path: cookiePath + '/infoSubmitList/submit',
          component: infoSubmit,
        },
        {
          path: cookiePath + '/infoSubmitList/infoDetail',
          component: infoDetail,
        },
      ]
    },
    {
      path: cookiePath + '/dailyReportList',
      component: dailyReportList,
      children: [
        {
          path: cookiePath + '/dailyReportList/detail',
          component: dailyDetail,
        }
      ]
    },
    {
      path: cookiePath + '/workReportList',
      component: workReport,
      children: [
        {
          path: cookiePath + '/workReportList/riskDetail',
          component: riskDetail,
        },
      ]
    },
  ]
});
